package com.joshua.spring.fallback;

import com.joshua.spring.entity.em.ResponseEnum;
import com.joshua.spring.entity.vo.GlobalResponse;
import com.joshua.spring.form.ContainsArrayObjForm;
import com.joshua.spring.form.ParamsObjFrom;
import com.joshua.spring.spi.ProviderDemoClient;
import org.springframework.stereotype.Component;

/**
 * description
 * package com.spring.joshua.fallback
 * classname  ProviderDemoClientFallback
 *
 * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
 * @date 2020/3/30 16:44
 */
@Component
public class ProviderDemoClientFallback implements ProviderDemoClient {

    @Override
    public GlobalResponse paramsObj(ParamsObjFrom form) {
        return GlobalResponse.buildFail(ResponseEnum.REQUEST_BREAKING);
    }

    @Override
    public GlobalResponse pathInfo(String id) {
        return GlobalResponse.buildFail(ResponseEnum.REQUEST_BREAKING);
    }

    @Override
    public GlobalResponse arrayInfo(String[] ids) {
        return GlobalResponse.buildFail(ResponseEnum.REQUEST_BREAKING);
    }

    @Override
    public GlobalResponse listInfo(ContainsArrayObjForm form) {
        return GlobalResponse.buildFail(ResponseEnum.REQUEST_BREAKING);
    }
}
